#ifndef __STATE_MACHINE_H__
#define __STATE_MACHINE_H__

typedef enum{
    sta_origin = 0,
    sta_running,
    sta_owencpu,
    sta_sleep_int,
    sta_sleep_unint,
}State;

typedef enum{
    evt_fork = 0,
    evt_sched,
    evt_wait,
    evt_wait_unint,
    evt_wake_up,
    evt_wake,
}EventID;

typedef void (*p_CallBack)(void *) CallBack;
typedef struct{
    State curState;//当前状态；
    EventID eventId;//事件ID;
    State nextState;//下个状态;
    CallBack action;
}StateTransform;

#endif /* __STATE_MACHINE_H__ */
